package cn.zwx.common.logger.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author zhangwenxue
 */
@Data
@ConfigurationProperties(prefix = "cn.zwx.logger")
public class AspectLogProperties {

    /**
     * 是否开启日志打印
     */
    private boolean enable = true;

    /**
     * 打印日志path
     */
    private String[] paths;

    /**
     * 是否开启trackId
     */
    private boolean track = true;

    /**
     * 是否开启http打印
     */
    private boolean http = true;

    /**
     * 少于多少毫秒不打印
     */
    private Long limitTime = 0L;


    @Value("${spring.application.name}")
    private String appId;

    @Value("${cn.zwx.logger.paths:cn.zwx.}")
    public void setPaths(String paths) {
        this.paths = paths.split(",;");
    }


}
